


import lejos.robotics.proposal.DifferentialPilot;
import lejos.robotics.subsumption.*;

public class DriveForward implements Behavior{
	private boolean suppressed = false;
	private DifferentialPilot pilot;
	
	public DriveForward(DifferentialPilot pilot){
		this.pilot = pilot;
	}
	
	public boolean takeControl(){
		//Standaardgedrag van de robot is vooruitgaan
		return true; 
	}
	
	public void suppress(){
		pilot.stop();
		suppressed = true;
	}
	
	public void action(){
		suppressed = false;		
		while(!suppressed){
			//steeds kleine stapjes vooruit tot interrupted
			pilot.forward();
		}	
	}
	
	

}
